#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
#include<assert.h>
void* my_memcpy(void* des, const void* sourse, size_t num)
{
	assert(sourse);
	void* ret = des;
	assert(ret);

	while (num--)
	{
		*(char*)ret = *(char*)sourse;
		ret=(char*)ret+1;
		sourse=(char*)sourse+1;
	}
	return des;
}
int main()
{
	int arr1[] = { 1,2,3,4,5,6,7,8,9,10 };
	int arr2[10] = { 0 };
	int arr3[100] = { 0 };
	memcpy(arr2, arr1, sizeof(arr1[0])*5);
	my_memcpy(arr3, arr1, sizeof(arr1[0] * 10));
	for (int i = 0; i < 5; i++)
	{
		printf("%d ", arr2[i]);
	}
	printf("\n");
	for (int i = 0; i < 5; i++)
	{
		printf("%d ", arr3[i]);
	}
	return 0;
}